package fr.afcepf.hotels.soa.entity;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the reservation_option database table.
 * 
 */
@Embeddable
public class ReservationOptionPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(insertable=false, updatable=false, nullable=false)
	private int idReservationVoiture;

	@Column(insertable=false, updatable=false, nullable=false)
	private int idOption;

	public ReservationOptionPK() {
	}
	public int getIdReservationVoiture() {
		return this.idReservationVoiture;
	}
	public void setIdReservationVoiture(int idReservationVoiture) {
		this.idReservationVoiture = idReservationVoiture;
	}
	public int getIdOption() {
		return this.idOption;
	}
	public void setIdOption(int idOption) {
		this.idOption = idOption;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof ReservationOptionPK)) {
			return false;
		}
		ReservationOptionPK castOther = (ReservationOptionPK)other;
		return 
			(this.idReservationVoiture == castOther.idReservationVoiture)
			&& (this.idOption == castOther.idOption);
	}

	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.idReservationVoiture;
		hash = hash * prime + this.idOption;
		
		return hash;
	}
}